#! /usr/bin/env python
# -*- coding: utf-8 -*-

# *************************************************************
# Filename @ center.py
# Author @ Huoty
# Create date @ 2014-10-16 16:56:20
# Description @ 
# *************************************************************

import gtk, sys

class PyApp(gtk.Window):
    def __init__(self):
        super(PyApp, self).__init__()

        self.set_title("Icon")
        self.set_size_request(250, 150)
        self.set_position(gtk.WIN_POS_CENTER)
        
        try:
            self.set_icon_from_file("k_256.png")
        except exception, e:
            print e.message
            sys.exit(1)

        self.connect("destroy", gtk.main_quit)
        
        self.show()


# Script starts from here

PyApp()
gtk.main()
